package com.ap.core.business.message.domain.translators;

import com.ap.core.backoffice.domain.BackOfficeOrderPayment;
import com.ap.core.domain.ApMessage;
import com.ap.core.domain.OrderPayment;
import com.ap.core.domain.OrderPaymentRefund;
import com.ap.core.domain.ZappUser;
import com.ap.core.exception.BusinessFailureException;
import com.ap.core.transaction.APTransactionInfo;

/**
 * User: Ranjit.Singh
 * Binder listener that receives callbacks on successful binding of header and messages.
 */
public interface BindingListener {

    /**
     * On creation of domain object ApEvent.
     * @param apMessage - ap event domain object
     * @param originalReadOnlyOrderPayment - original orderPayment object
     */
    void onApMessage(ApMessage apMessage, OrderPayment originalReadOnlyOrderPayment) throws BusinessFailureException;

    /**
     * On creation of  domain object OrderPayment
     * @param orderPayment - - order payment domain object
     */
    void onOrderPayment(OrderPayment orderPayment, APTransactionInfo apTransaction);
    


    /**
     * On creation of  domain object zappUser
     * @param zappUser - zappUser  domain object
     * @param verificationId - verification id
     */
    void onZappUser(ZappUser zappUser, String verificationId);


    /**
     * On creation of  domain object OrderPayment
     * @param orderPaymentRefund - - order payment domain object
     */
    void onOrderPaymentRefund(OrderPaymentRefund orderPaymentRefund, BackOfficeOrderPayment originalOrderPayment);

    void onApMessageBackOffice(ApMessage apMessage, BackOfficeOrderPayment backOfficeOrderPayment) throws BusinessFailureException;


}
